home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / PC Calenda197355172001.psc / fAlert.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-04-19  |  3.4 KB  |  113 lines

  1. VERSION 5.00
  2. Begin VB.Form fAlert 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Event Timer"
  5.    ClientHeight    =   2550
  6.    ClientLeft      =   45
  7.    ClientTop       =   360
  8.    ClientWidth     =   2925
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2550
  13.    ScaleWidth      =   2925
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.CommandButton cmdEnd 
  17.       Caption         =   "Completely Exit"
  18.       Height          =   375
  19.       Left            =   1440
  20.       TabIndex        =   0
  21.       Top             =   2160
  22.       Width           =   1455
  23.    End
  24.    Begin VB.ComboBox cboTitle 
  25.       Height          =   315
  26.       Left            =   0
  27.       Style           =   2  'Dropdown List
  28.       TabIndex        =   2
  29.       Top             =   0
  30.       Width           =   2895
  31.    End
  32.    Begin VB.CommandButton cmdClose 
  33.       Caption         =   "Close Window"
  34.       Height          =   375
  35.       Left            =   0
  36.       TabIndex        =   1
  37.       Top             =   2160
  38.       Width           =   1335
  39.    End
  40.    Begin VB.Label lblDes 
  41.       Alignment       =   2  'Center
  42.       Caption         =   "Des"
  43.       Height          =   1455
  44.       Index           =   0
  45.       Left            =   0
  46.       TabIndex        =   3
  47.       Top             =   360
  48.       Width           =   2895
  49.    End
  50.    Begin VB.Label lblEvents 
  51.       Alignment       =   2  'Center
  52.       BeginProperty Font 
  53.          Name            =   "MS Sans Serif"
  54.          Size            =   8.25
  55.          Charset         =   0
  56.          Weight          =   700
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   255
  62.       Left            =   0
  63.       TabIndex        =   4
  64.       Top             =   1920
  65.       Width           =   2895
  66.    End
  67. Attribute VB_Name = "fAlert"
  68. Attribute VB_GlobalNameSpace = False
  69. Attribute VB_Creatable = False
  70. Attribute VB_PredeclaredId = True
  71. Attribute VB_Exposed = False
  72. Private Sub cboTitle_Change()
  73.     lblDes(cboTitle.ListIndex).Visible = True
  74.     lblDes(cboTitle.ListIndex).ZOrder
  75. End Sub
  76. Private Sub cboTitle_Click()
  77.     lblDes(cboTitle.ListIndex).Visible = True
  78.     lblDes(cboTitle.ListIndex).ZOrder
  79. End Sub
  80. Private Sub cmdClose_Click()
  81.     Unload fAlert
  82.     Load frm
  83. End Sub
  84. Private Sub cmdEnd_Click()
  85.     SaveSetting "PC Calendar", "Options", "LA", Now
  86.     End
  87. End Sub
  88. Private Sub Form_Load()
  89.     Dim A As Integer
  90.     FirstRound = True
  91.     For A = 0 To UBound(FiredEvents)
  92.         cboTitle.AddItem Events(FiredEvents(A)).Title
  93.         
  94.         If A > 0 Then Load lblDes(A)
  95.         lblDes(A).Caption = GetPrelude(Events(FiredEvents(A))) & Chr(13) & Chr(13) & Events(FiredEvents(A)).description
  96.         lblDes(A).Visible = True
  97.     Next A
  98.     cboTitle.ListIndex = 0
  99.     lblDes(0).ZOrder
  100.     Me.lblEvents.Caption = UBound(FiredEvents) + 1 & " event(s)"
  101.     Me.Visible = True
  102. End Sub
  103. Private Function GetPrelude(Evnt As Evt)
  104.     Select Case DaysAway(Evnt)
  105.         Case 0
  106.             GetPrelude = "Happening Today."
  107.         Case 1
  108.             GetPrelude = "Happening Tomorrow."
  109.         Case Else
  110.             GetPrelude = "Happening in " & DaysAway(Evnt) & " days."
  111.     End Select
  112. End Function
  113.